<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>登录</title>
</head>
<script src="${pageContext.request.contextPath}/static/js/jquery.js"></script>

<script>
   

    function sendEmail() {
        $.ajax({
            url:"/email/sendEmail",
            type:"post",
            data:{"email":$("#email").val()},
            dataType:"json",
            success:function (data) {
                if(data=="1"){
                    alert("邮件发送成功")
                }else{
                    alert("邮件发送失败")
                }
            },
        });
    }

</script>

<body>
<form action="/login/forget" method="post">
    用户名：<input type="text" value="" name="username" id="username"><br><br>

    密码：<input type="text" value="" name="password"><br><br>

    确认密码：<input type="text" value="" name="rePassword"><br><br>

    请输入邮箱：<input type="text" name="email" id="email" value="785447986@qq.com">
    <input type="button" value="发送邮件" onclick="sendEmail()"><br>

    验证码：<input type="text" name="code"><br>

    <input type="submit" value="修改密码">
</form>

</body>
</html>
